<?php
$tablafot="galerias";
$condicionfot="gal_pub=1";
$ordenfot="order by gal_id desc limit 0,1";
$resfot=  cons_sql($tablafot, $condicionfot, $ordenfot);
$regfot=  mysql_fetch_array($resfot);
$regfottum=mysql_fetch_array($resfot);
if(mysql_num_rows($resfot)>0):

$tabgal="galeriaximagenes";
        $condgal="gal_gal_id=".$regfot['gal_id'];
        $ordengal="limit 0,5";
        $resgal=  cons_sql($tabgal, $condgal, $ordengal);
         $resgaltum=  cons_sql($tabgal, $condgal, $ordengal);
?>
<div class="recuadro">
 <div class="tit_recuadro">FOTOGALERIA</div>
<div id="container">
                <div id="gallery">
               <?php while($reggal=  mysql_fetch_array($resgal)):?>
    		   <img src="../panel/archivos/<?php echo utf8_encode($reggal['gal_img'])?>" width="500" height="300"/>
                   <div id="descripcion"><?php echo utf8_encode($reggal['gal_des'])?></div>
                <?php endwhile ?>
                   </div>
                   <div id="thumbs">
               <?php while($reggaltum=  mysql_fetch_array($resgaltum)):?>
    	   	   <img src="../panel/archivos/<?php echo utf8_encode($reggaltum['gal_img'])?>" width="100" height="100"/>
    	
                <?php endwhile ?>
                    </div>
        	<a id="next"></a>

<!--                	<div id="gallery">
    		   <img src="includes/galeria/img/1.jpg" />
    		   <img src="includes/galeria/img/2.jpg" />
    		   <img src="includes/galeria/img/3.jpg" />
    		   <img src="includes/galeria/img/4.jpg" />
            	   <img src="includes/galeria/img/5.jpg" />
            	   <img src="includes/galeria/img/6.jpg" />
	        </div>

                <div id="thumbs">
    	   	   <img src="includes/galeria/img/11.jpg" />
    		   <img src="includes/galeria/img/22.jpg" />
    		   <img src="includes/galeria/img/33.jpg" />
    		   <img src="includes/galeria/img/44.jpg" />
            	   <img src="includes/galeria/img/55.jpg" />
            	   <img src="includes/galeria/img/66.jpg" />
	        </div>-->
        </div>

<!--	<script type="text/javascript" src="includes/galeria/js/jquery.js"></script>
	<script type="text/javascript" src="includes/galeria/js/mocha.js"></script>-->
</div>
<?php endif?>